package com.atguigu.scala.chapter8

import scala.io.StdIn

/**
 * @author lizikuan
 * @date 2021/5/25 18:03
 */
object $02_MatchIf {
  def main(args: Array[String]): Unit = {
    val str = StdIn.readLine("请输入一串字符：")
    str match {
      case x if (x.contains("hello")) => println(s"hello = ${x}")
      case x if (x.contains("java")) => println(s"java = ${x}")
    }
  }
}
